<template>
  <div style="">
    <div class="album">
      <ul>
        <li @click="$router.push('/works')">作品</li>
        <li @click="$router.push('/album')" style="color: rgb(70, 210, 51)">
          专辑
        </li>
        <li @click="$router.push('/collection')">收藏</li>
        <li @click="$router.push('/profile')">资料</li>
        <li @click="$router.push('/honor')">荣誉</li>
        <li class="album_li" >
          <el-button type="text" @click="dialogFormVisible = true"
            ><i class="el-icon-circle-plus"></i>
            <span>创建专辑</span></el-button
          >

          <el-dialog title="新建专辑" v-model="dialogFormVisible">
            <el-form :model="form">
              <el-form-item label="名称" :label-width="formLabelWidth">
                <el-input
                  v-model="form.album_name"
                  autocomplete="off"
                ></el-input>
              </el-form-item>
              <el-form-item label="描述" :label-width="formLabelWidth">
                <el-input v-model="form.album_s" autocomplete="off"></el-input>
              </el-form-item>
            </el-form>
            <template #footer>
              <span class="dialog-footer">
                <el-button @click="dialogFormVisible = false">取 消</el-button>
                <el-button @click="dialogFormVisible = false"
                  >确 定</el-button
                >
              </span>
            </template>
          </el-dialog>
        </li>
      </ul>
    </div>
    <div style="background-color: rgb(239, 239, 245)" class="content">
      <div>
        <n-card
          :title="work.album_name"
          v-for="work in works.slice(0, 1)"
          :key="work"
          class="content_card"
        >
          <template #cover>
            <img :src="work.works_url" />
          </template>
          0
        </n-card>
        <n-card
          :title="work.album_name"
          v-for="work in works.slice(1)"
          :key="work"
          class="content_card"
        >
          <template #cover>
            <img :src="work.works_url" />
          </template>
          卡片内容
        </n-card>
      </div>
    </div>
  </div>
</template>

<script>
import navBar from "@/components/navBa.vue";
export default {
  components: {
    navBar,
  },
  data() {
    return {
      dialogFormVisible: false,
      form: {
        album_name: "",
        album_s: "",
      },
      works: [
        {
          works_url:
            "http://static-c.pocoimg.cn/project/poco_new_pc/prod/online/image/widget/user_album_preview/images/album-default-image_380135f.png",
          album_name: "默认专辑",
          currentDate: new Date(),
        },

        {
          works_url:
            "http://static-c.pocoimg.cn/project/poco_new_pc/prod/online/image/widget/user_album_preview/images/album-default-image_380135f.png",
          album_name: "默认专辑",
          currentDate: new Date(),
        },{
          works_url:
            "http://static-c.pocoimg.cn/project/poco_new_pc/prod/online/image/widget/user_album_preview/images/album-default-image_380135f.png",
          album_name: "默认专辑",
          currentDate: new Date(),
        },
        {
          works_url:
            "http://static-c.pocoimg.cn/project/poco_new_pc/prod/online/image/widget/user_album_preview/images/album-default-image_380135f.png",
          album_name: "默认专辑",
          currentDate: new Date(),
        },
      ],
    };
  },
  methods: {
    a() {
      dialogFormVisible = false;
    },
  },
  mounted() {},
};
</script>
<style scoped lang="less">
.album {
  padding: 30px;
  background-color: white;
  border-top: 3px solid rgb(238, 238, 238);
  border-bottom: 1px solid rgb(238, 238, 238);
  ul {
    width: 800px;
    list-style: none;
    margin-left: 15%;
    li {
      font-size: 14px;
      position: relative;
      top: -20px;
      left: 30%;
      float: left;
      margin-left: 40px;
    }
    .album_li {
      margin: -10px 150px;

      i {
        color: rgb(70, 210, 51);
        margin: 1px 20px;
        font-size: 20px;
      }
      span {
        color: rgb(70, 210, 51);
        font-size: 18px;
      }
    }
  }
}

.content {
  min-width: 1300px;
  padding: 0px 70px;
  padding-bottom: 100px;
  div::after {
    display: block;
    content: "";
    clear: both;
  }
  div {
    img {
      width: 350px;
      height: 200px;
    }
    .content_card {
      float: left;
      margin-top: 4%;
      margin-left: 6%;
      width: 350px;
      height: 300px;
    }
  }
}
</style>